﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace EasyClassWEBAPI.EntityClass
{
    public class Comment
    {
        [Key]
        [ScaffoldColumn(false)]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int CommentID { get; set; }
        [Required]
        public string Publisher { get; set; }
        [Required]
        public string Body { get; set; }

        public int PostID { get; set; }
        public Post Post { get; set; }
        public Comment(string publisher,string Body)
        {
            this.Publisher = publisher;
            this.Body = Body;
        }
    }
}
